-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mitigated several compiler warnings / suppress compiler warnings in CI where we don't care about them #5497
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
firewave
changed the title
perform build with latest GCC in script check and bail out on warnings / mitigated several compiler warnings
perform build with latest GCC in scriptcheck and bail out on warnings / mitigated several compiler warnings
Sep 29, 2023
firewave
changed the title
perform build with latest GCC in scriptcheck and bail out on warnings / mitigated several compiler warnings
perform build with latest GCC in scriptcheck / mitigated several compiler warnings
Sep 29, 2023
firewave
changed the title
perform build with latest GCC in scriptcheck / mitigated several compiler warnings
mitigated several compiler warnings / suppress compiler warnings in CI where we don't care about them
Sep 29, 2023
I added a ticket about cases we should bail out on warnings on: https://trac.cppcheck.net/ticket/12021 |
danmar
reviewed
Oct 5, 2023
StefanVK
added a commit
to StefanVK/cppcheck
that referenced
this pull request
Nov 11, 2023
When building with /Od - default cmake debug build for me, the __assume(false); trick does not work to get rid of the C4714 warnings https://godbolt.org/z/a6xGnfP7d D:\tmp\cppcheck\lib\keywords.cpp(205): warning C4715: 'Keywords::getOnly': not all control paths return a value D:\tmp\cppcheck\lib\keywords.cpp(226): warning C4715: 'Keywords::getOnly': not all control paths return a value D:\tmp\cppcheck\lib\keywords.cpp(168): warning C4715: 'Keywords::getAll': not all control paths return a value D:\tmp\cppcheck\lib\keywords.cpp(188): warning C4715: 'Keywords::getAll': not all control paths return a value Proposed fix: also define NORETURN to [[noreturn]] when according to __has_cpp_attribute [[noreturn]] is supported https://en.cppreference.com/w/cpp/feature_test (For previous discussion see also danmar#5497)
This was referenced Nov 11, 2023
firewave
pushed a commit
that referenced
this pull request
Nov 12, 2023
When building with /Od - default cmake debug build for me, the __assume(false); trick does not work to get rid of the C4714 warnings https://godbolt.org/z/a6xGnfP7d D:\tmp\cppcheck\lib\keywords.cpp(205): warning C4715: 'Keywords::getOnly': not all control paths return a value D:\tmp\cppcheck\lib\keywords.cpp(226): warning C4715: 'Keywords::getOnly': not all control paths return a value D:\tmp\cppcheck\lib\keywords.cpp(168): warning C4715: 'Keywords::getAll': not all control paths return a value D:\tmp\cppcheck\lib\keywords.cpp(188): warning C4715: 'Keywords::getAll': not all control paths return a value Proposed fix: also define NORETURN to [[noreturn]] when according to __has_cpp_attribute [[noreturn]] is supported https://en.cppreference.com/w/cpp/feature_test (For previous discussion see also #5497)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There's no need to generate any warnings in the CI unless we react on them.